#ifndef __CMAP_H__
#define __CMAP_H__

#include "Sprites.h"
#include "DxGraphics.h"
#include "DxInput.h"
#include "GameState.h"
#include "GItems.h"
#include "GEnemy.h"
#include "GBonus.h"
#include "Bullet.h"
#include "GBackGround.h"

#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <Time.h>
#include <io.h>
#include <fstream>
#include <string>
#include <vector>

using std::vector;
using namespace std;

class CMap
{
private:

	int			_mapWidth;
	int			_mapHeight;
	SOUND*		_soundManager;
	bool		_isGameOver;
	int			_world;	

public:
	bool		_loadGame;
	QuadTree*	_quadTree;
	CScreen*	_myScreen;
	Mario*		_myMario;
	Infomation* _infomation;

	BulletManager*		_bulletManager;
	CMap(SOUND *sManager, int idWorld);
	~CMap();
	vector<string> SplitString(string str, char ch);
	int GetWorld(){return _world;}
	bool IsGameOver(){return _isGameOver;}
	void Update(DWORD tickPerFrame,CDxInput* input);
	void LoadDataFromFile(char* filePath);
	void SaveDataToFile();
	void LoadNewWorld();	
	void Reset();
	void FinshMap();
	void Draw();
	void CreateSightMap(int world);
};

#endif